<!DOCTYPE html>  
<html>  
  <head>  
    <title>Function</title>  
  </head>
  <body>  
    <script type="text/javascript">
       function hi(){
           document.write("How are you? Ann<br>");
       }
       hi()
       
       function hello(fname, age){
           return fname + " is " + age;  
       }
       document.write(hello("Bob", 18)+"<br>");
       
       var add=new Function("num1","num2","return num1+num2");  
       document.write(add(2,5)); 
    </script> 
  </body>  
</html>